package cn.iocoder.yudao.module.alipay.controller.app.mlong;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.alipay.controller.app.lianlian.vo.LianLianOrderCreateReqVO;
import cn.iocoder.yudao.module.alipay.service.linalian.LLOrderService;
import cn.iocoder.yudao.module.alipay.service.mlong.MLongService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "小程序相关 - 梦龙API")
@RestController
@RequestMapping("/mlong/order")
@Validated
public class MLongController {


    @Resource
    private MLongService mLongService;

    // TODO 联联通相关 - 联联通订单

/*
    @PostMapping("/apiToOrder")
    @Operation(summary = "下单接口")
    public CommonResult<Object> createOrder(@Valid @RequestBody LianLianOrderCreateReqVO createReqVO) throws Exception {
        //https://haokaopenapi.lot-ml.com/api/order/ApiToOrder
        return success(mLongService.createOrder(createReqVO));
    }
*/

    @PostMapping("/getProducts")
    @Operation(summary = "产品上架查询接口")
    public CommonResult<Object> getProducts() throws Exception {
        //https://appapis.lot-ml.com/apis/CardInfo
        return success(mLongService.getProducts());
    }


}
